<template>
	<view><nyn-city-list :cityStr="city" :addressStr="address" :hot="true" @bindCity="bindCity"></nyn-city-list></view>
</template>
<script>
import nynCityList from '@/components/nyn-city-list/nyn-city-list.vue';
import { commonMixinFun } from '@/static/mixins/common.js';
const app = getApp();
export default {
	components: {
		nynCityList
	},
	mixins: [commonMixinFun],
	data() {
		return {
			address: '',
			city: ''
		};
	},
	methods: {
		//点击城市时触发,event = {id,name,spell}
		bindCity(e) {
			app.globalData.location.lat = 0;
			app.globalData.location.city = e.name.replace('市')
			this.pageTo('/pages/location_list/index',{},'redirect')
		}
	},
	onShow() {
		let {city,address}=app.globalData.location;
		this.city=city;
		this.address=address;
	}
};
</script>

<style></style>
